perm filename DOWNLO.ME[UP,DOC]2 blob sn#779702 filedate 1984-12-25 generic text, type T, neo UTF8
The program DOWNLOAD can be used to download a text "segment" (a
string of characters from a file) to your terminal in image mode,
for instance to set up some programmable keys.  The general form
of a file segment is this (a file may contain many of these):

DOWNLOAD/name: 8 { <segment text> }

where:	"DOWNLOAD" must occur at the beginning of a line,
	the segment name (with slash) is optional (dots and hyphens are OK),
	the "8" is optional and indicates 8-bit output instead of even parity,
	the curly braces delimit the segment text.

The segment text is in E macro format (uses "⊗" as an escape character, "α" to
turn on the parity bit -- see below for details).  If you want even-parity
characters output to the terminal, then omit the optional "8" after the colon.

To specify which segment is to be down-loaded by this program, type the
monitor command DOWNLOAD followed by a segment-name and/or @<file>.  The
default PPN for files is your logged-in PPN (OPTION.TXT is recommended).
Here are some examples of arguments to the DOWNLOAD command and what they
get you:

<cr>		first DOWNLOAD segment in login-area file OPTION.TXT
DM		segment DOWNLOAD/DM: in login-area file OPTION.TXT
H-19 @DOWN	segment DOWNLOAD/H-19: in login-area file DOWN.TXT
/AMB.E DOWN.	segment DOWNLOAD/AMB.E: in login-area file DOWN.
@SYS:		first DOWNLOAD segment (named or not) in SYS:OPTION.TXT

- - - - - - - -

     Invoking DOWNLOAD

The program can be run with the DOWNLOAD monitor command, or explicitly
with the R command.  Examples, matching those above:

DOWNLOAD
DOW DM
R DOWNLOAD;H-19 @DOWN
R DOWNLO;/AMB.E DOWN.
DOW@SYS:


- - - - - - - -

     LOGIN options with DOWNLOAD

You can have LOGIN automatically download a character string by using
the DOWNLOAD LOGIN option:

LOGIN:DOWNLOAD 8 { <segment text> }

or with a display suboption which will have effect only if the display
option is effective:

LOGIN:FDISPLAY=<name>(DOWNLOAD 8 { <segment text> })

As in the DOWNLOAD program, the segment text is interpreted in E macro
format (and the "8" is optional, etc.).

These LOGIN options will not output anything on a DD or III, but the
DOWNLOAD program will output a DD or III -- this can be used to test
out your string definitions on a DD, say, before trying them on the
terminal of interest.  On DDs and IIIs, the result of "downloading"
is just typing out the characters on the terminal (after SAIL/ASCII
character conversion! -- see below).

- - - - - - - -

     Character represention in segment text: E Macro Format

The E macro-format text representation allows 9-bit characters to be
represented in ordinary 7-bit text by making use of three special escape
characters and by ignoring several formatting characters.  Since DOWNLOAD
only needs 8-bit characters (as that's what terminals generally accept),
the escape character ("β") which normally turns on the 9th bit is not
used by DOWNLOAD.

The ignored formatting characters can be used freely to make the
download file more readable.  The ignored characters are:

	TAB,ALT,CR,LF,BS,VT,FF, and NULL.

One character is treated specially as the end of the segment:

	"}"

The two special escape characters used by DOWNLOAD are:

	"⊗" and "α"

The "α" is used to turn on the 8th bit (parity bit) of the
following character, and the "⊗" (circle-x) is used to specify
output of a character that otherwise couldn't be output (one of
the ignored characters, the escapes, or "}").

To represent any of the ignored characters or any of the three
special characters, a two-character sequence is used, namely, the
character "⊗" (circle-x) followed by a character specifying which
character you want output.  Actually, there are two possible
two-character sequences (the standard and the alternate) for most
special output characters, as indicated by the table below.  The
alternate sequences are perhaps a bit more easily identifiable, as
they are fairly mnemonic.

     Representations	  Corresponding output character
   Standard  Alternate
      ⊗⊗	⊗⊗	  ⊗	circle-x
      ⊗;	⊗;	  Ignore text from here to end of line (to CR, LF or FF).
      ⊗⊂	⊗⊂	  Ignore text from here to first right-horseshoe (⊃).
      ⊗=	⊗T	  TAB	horizontal tab
      ⊗≠	⊗A	  ALT	altmode
      ⊗↔	⊗C	  CR	carriage return
      ⊗↓	⊗L	  LF	linefeed
      ⊗↑	⊗B	  BS	backspace (that is, RUBOUT: 177 octal, NOT 010)
      ⊗←	⊗V	  VT	vertical tab
      ⊗→	⊗F	  FF	formfeed
      ⊗α	⊗X	  α	alpha
      ⊗}	⊗R	  }	right brace (normally taken as end of segment)
      ⊗0	⊗N	  NULL	null character (000)
      α		⊗1	  Add parity bit to next character

The escape sequences ⊗; and ⊗⊂ can be used for putting comments
into a segment without having the comments taken as part of the
text to be output.  The form ⊗; allows you to put a comment at the
end of a line, and the form ⊗⊂ allows you to have partial-line or
multi-line comments.  Note that since TABs are ignored, you can
use them to set off comments or actual output text from other text
in a file.

N.B.:  Before the characters are output to your terminal,
SAIL-to-ASCII character conversion is done to map the SAIL
characters specified into their ASCII equivalents.  Thus, if you
specify output of an Altmode, what gets sent to your terminal will
be the ASCII Altmode (Escape): octal 033.  Here are the four
characters affected by this conversion that outputs ASCII:

	SAIL	ASCII	character

	032	176	tilde
	033	032	not-equals sign
	175	033	altmode (escape)
	176	175	right brace

Note that the SAIL Backspace character (rubout, 177) does not get
converted to anything else.  To output the ASCII Backspace (010),
use SAIL's lambda (λ, 010).

- - - - - - - -

     Example DOWNLOAD segments in a file

Here are some examples of DOWNLOAD segments you might put in a file
(generally, OPTION.TXT):

DOWNLOAD/hello:{hello}	⊗;doesn't do much, just says "hello"
DOWNLOAD/bucky:{⊗A[1F2;⊗N↑⊗A[2F2;⊗N~⊗A[3F2;⊗N%}
	⊗; This second example sets up 3 programmable keys on a
	⊗; hypothetical EDIT-key display, to do CONTROL, META, CONTROL-META.
	⊗; Each subsequence starts with ⊗A[nFm; for key PFn, m chars long,
	⊗; and then ends with the m=2 characters: a null (⊗N) and one of ↑~%